package com.msl.dialog;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.msl.R;

import butterknife.Bind;


public class ChooseDialog1 extends Dialog {

    @Bind(R.id.bt1)
    Button bt1;
    @Bind(R.id.bt2)
    Button bt2;
    @Bind(R.id.tvn)
    TextView tvn;
    private String tag = "ChooseDialog1";



    public interface PriorityListener {
        /**
         * 回调函数，用于在Dialog的监听事件触发后刷新Activity的UI显示
         */
        void setActivityText();
    }

    private PriorityListener listener;

    private Context mContext;

    public ChooseDialog1(final Context context, int theme, PriorityListener priorityListener) {
        super(context, theme);
        mContext = context;
        listener = priorityListener;
        setContentView(R.layout.dialog_c1);
        bt1 = (Button) findViewById(R.id.bt1);
        bt2 = (Button) findViewById(R.id.bt2);
        bt2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                dismiss();
            }
        });
        bt1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                dismiss();
                listener.setActivityText();
            }
        });
    }


}


